#include "tire_model_factory.hpp"
using namespace auto_ros::control;
int main()
{
	TireModelFactory tire_factory;
	auto_ros::common_tool::double_map parm = {{"mu", 1.0}, {"c_alpha", 96000}};
	std::shared_ptr<TireModelBase> tire_ptr = tire_factory.CreateSharedObject("BrushModel", parm);
	auto_ros::common_tool::double_map input = {{"alpha_rad", 0.1}, {"fz", 4800.0}};
	std::cout << tire_ptr->calc_fy(input) << std::endl;
	input["alpha_rad"] = 0.0;
	std::cout << "alpha_rad is:" << input["alpha_rad"] << std::endl;
	std::cout << tire_ptr->calc_dyn_c_alpha(input) << std::endl;
	std::cout << tire_ptr->calc_static_c_alpha(input) << std::endl;
	input["alpha_rad"] = 0.3;
	std::cout << "alpha_rad is:" << input["alpha_rad"] << std::endl;
	std::cout << tire_ptr->calc_dyn_c_alpha(input) << std::endl;
	std::cout << tire_ptr->calc_static_c_alpha(input) << std::endl;
	input["alpha_rad"] = -0.1;
	std::cout << "alpha_rad is:" << input["alpha_rad"] << std::endl;
	std::cout << tire_ptr->calc_dyn_c_alpha(input) << std::endl;
	std::cout << tire_ptr->calc_static_c_alpha(input) << std::endl;
	input["alpha_rad"] = -0.3;
	std::cout << "alpha_rad is:" << input["alpha_rad"] << std::endl;
	std::cout << tire_ptr->calc_dyn_c_alpha(input) << std::endl;
	std::cout << tire_ptr->calc_static_c_alpha(input) << std::endl;
	input["alpha_rad"] = 0.3;
	std::cout << "alpha_rad is:" << input["alpha_rad"] << std::endl;
	std::cout << tire_ptr->calc_dyn_c_alpha(input) << std::endl;
	std::cout << tire_ptr->calc_static_c_alpha(input) << std::endl;
}